﻿<?php
require_once("conn.php");//引用数据库链接文件
$wnan = $_GET['wnan'];//GET方法为URL参数传递
$tm = $_GET['time']; //GET方法为URL参数传递

//DELETE FROM `rx_wnan` WHERE time = '2019-03-31 12:12:12'
$sql = "DELETE FROM `rx_wnan` WHERE time = '$tm'";
mysql_query($sql);//借SQL语句插入数据

//INSERT INTO `rx_wnan`(`time`, `wnan`) VALUES (CURRENT_TIMESTAMP,"|fffewfraf|aefadsfafas")
$sql = "INSERT INTO `rx_wnan`(`time`, `wnan`) VALUES ('$tm','$wnan')";

mysql_query($sql);//借SQL语句插入数据
mysql_close();//关闭MySQL连接
// echo '".$id.'<p>' written.<br>";
// echo "<p align='center'><font color='#6CC'; size=26px;>".$_GET['id']."&nbsp</font></p>";
//echo $query;
?>